# Maintainer: David Runge <dvzrv@archlinux.org>

_name=kazoo
pkgname=python-kazoo
pkgver=2.9.0
pkgrel=2
pkgdesc="A high-level Python library that makes it easier to use Apache Zookeeper"
arch=(any)
url="https://github.com/python-zk/kazoo"
license=(Apache)
depends=(python-six)
makedepends=(python-build python-installer python-setuptools python-wheel)
# checkdepends=(python-nose python-objgraph)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha512sums=('81aa27e4b406622059bfecaac157462adb107630638fb4eed62b0e5460e5312768140fa6c2ab63def35b4e726819b74a90b03b3ab733af5550cb698414a29b84')
b2sums=('bbc1fc9235c234c27c8179b094b48fe6bbde0d6a4e41b0f752f466141bee9d28d25eeeacd7305c50ad73f4a11de35369be5d560fc4d365840b980e905118bae3')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

# NOTE: check() requires running zookeeper
# check() {
#   cd $_name-$pkgver
#   export PYTHONPATH="build:${PYTHONPATH}"
# }

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 {CHANGES,CONTRIBUTING,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
